/*
1小星星
2两只老虎
3隐形的翅膀
4童话镇
5因为爱情
6难念的经
7美丽的神话
*/
int musicnum[][1000] = {{0, 1,500, 1,500, 5,500, 5,500, 6,500, 6,500, 5,500, -1,500,
     4,500, 4,500, 3,500, 3,500, 2,500, 2,500, 1,500, -1,500,
     5,500, 5,500, 4,500, 4,500, 3,500, 3,500, 2,500, -1,500,
     5,500, 5,500, 4,500, 4,500, 3,500, 3,500, 2,500, -1,500,
     1,500, 1,500, 5,500, 5,500, 6,500, 6,500, 5,500, -1,500,
     4,500, 4,500, 3,500, 3,500, 2,500, 2,500, 1,500, -1},
    {0, 1,400, 2,400, 3,400, 1,400, -1,400,//两只老虎
     1,400, 2,400, 3,400, 1,400, -1,400,
     3,400, 4,400, 5,400, -1,400,
     3,400, 4,400, 5,400, -1,400,
     5,400, 6,400, 5,400, 4,400, 3,400, 1,400, -1,400,
     5,400, 6,400, 5,400, 4,400, 3,400, 1,400, -1,400,
     2,400, 5,400, 1,400, -1,400,
     2,400, 5,400, 1,400, -1},
    {0, 1,350, 4,350, 6,350, -1,500,//隐形的翅膀
     8,350, 6,350, -1,500,
     5,350, 4,350, 4,350, 4,350, -1,500,
     4,350, 2,350, 1,350, 1,350, -1,500,
     1,350, 4,350, 6,350, -1,500,
     8,350, 8,350, 8,350, -1,500,
     9,350, 8,350, -1,500,
     8,350, 5,350, 6,350, 5,350, -1,500,
     4,350, 5,350, 5,350, -1,500,
     9,350, 8,350, 6,350, -1,500,
     8,350, 8,350, 8,350, 9,350, 8,350, -1,500,
     6,350, 5,350, 4,350, 5,350, 2,350, -1,500,
     1,350, 2,350, 4,350, -1,500,
     6,350, 5,350, -1,500,
     6,350, 4,350, -1,500,
     6,350, 8,350, 11,350, -1,500,
     11,350, 10,350, -1,500,
     9,350, 8,350, 9,350, 11,350, -1,500,
     6,350, 5,350, 4,350, -1,500,
     4,350, 4,350, -1,500,
     4,350, 11,350, -1,500,
     9,350, 8,350, -1,500,
     6,350, 5,350, -1,500,
     4,350, 5,350, 5 - 1,350,
     6,350, 8,350, 11,350, -1,500,
     11,350, 10,350, -1,500,
     9,350, 8,350, 9,350, 11,350, -1,500,
     6,350, 5,350, 4,350, -1,500,
     4,350, 4,350, -1,500,
     4,350, 11,350, -1,500,
     9,350, 8,350, -1,500,
     6,350, 5,350, -1,500,
     5,350, 4,350, -1,500,
     4,350, -1},
    {0, 3, 250, 4, 250, 3, 750, 2, 2, -1, 500,//童话镇
     3, 250, 4, 250, 3, 750, 2, 750, 1, 500, -2, 1000,
     3, 250, 4, 250, 3, 750, 2, 2, -1, 500,
     3, 250, 4, 250, 5, 1000, -1, 500,
     4, 500, 3, 1000, -1, 500,
     2, 250, 3, 250, 4, 250, 3, 250, 4, 250, 3, 250, 2, 500, 6, 250, 5, 1250, -1, 500,
     2, 250, 3, 250, 4, 250, 3, 250, 4, 250, 3, 250, 2, 500, 3, 250, -2, 1250, -1, 500,
     2, 250, 3, 250, 4, 250, 3, 250, 4, 250, 3, 250, 2, 500, 6, 250, 8, 1250, -1, 500,
     6, 250, 6, 250, 5, 250, 4, 250, 5, 250, 4, 250, 5, 500, 4, 250, 3, 1250, -1, 500,
     2, 250, 3, 250, 4, 250, 3, 250, 4, 250, 3, 250, 2, 500, 6, 250, 5, 1250, -1, 500,
     2, 250, 3, 250, 4, 250, 3, 250, 4, 250, 3, 250, 2, 500, 3, 250, -2, 1250, -1, 500,
     2, 250, 3, 250, 4, 250, 3, 250, 4, 250, 3, 250, 2, 500, 6, 250, 8, 1250, -1, 250,
     6, 250, 6, 250, 8, 250, 7, 250, 7, 250, 7, 250, 7, 500, 6, 250, 7, 250, 7, 500, 6, 750, -1, 250,
     6, 250, 6, 250, 9, 250, 8, 250, 9, 250, 8, 250, 7, 500, 9, 250, 8, 1250, -1, 250,
     6, 250, 6, 250, 6, 250, 7, 250, 7, 250, 7, 250, 6, 250, 7, 250, 6, 250, 5, 250, 7, 500, 6, 750, -1, 250,
     6, 250, 6, 250, 9, 250, 8, 250, 9, 250, 8, 250, 7, 500, 9, 250, 8, 1250, -1, 250,
     6, 250, 6, 250, 5, 500, 5, 500, 5, 500, 4, 500, 3, 1000, 6, 500, 5, 500,
     4, 500, 2, 500, 4, 500, 5, 500, 6, 500, 8, 500, 6, 500, 5, 500,
     4, 500, 2, 500, 2, 500, 1, 500, -2, 1000, -1, 500,
     4, 250, 3, 250, 2, 500, 1, 500, 2, 500, 4, 500, 4, 500, 8, 500, 6, 500, 6, 250, 5, 250,
     4, 500, 4, 500, 4, 500, 2, 500, 3, 1000, -1, 500,
     6, 250, 5, 250, 6, 500, 5, 500, 6, 500, 8, 500, 9, 500, 8, 500, 8, 250, 8, 500, 6, 250,
     9, 250, 8, 500, 7, 250, 8, 250, 7, 250, 8, 250, 7, 250, 6, 500, -1, 500,
     5, 250, 6, 250, 7, 500, 6, 500, 5, 500, 2, 250, 6, 500, 5, 250, 4, 500, 4, 250, 4, 250, 5, 250, 3, 250, 3, 500, 3, 250, 3, 250,
     3, 500, 2, 500, 3, 750, 6, 500, 5, 500, 4, 500, 2, 500, 4, 500, 5, 500, 6, 500, 8, 500, 6, 500, 5, 500, 4, 500,
     2, 500, 2, 500, 1, 500, -2, 1000, -1, 500,
     4, 250, 3, 250, 2, 500, 1, 500, 2, 500, 4, 500, 4, 500, 8, 500, 6, 500, 6, 250, 5, 250, -1, 250,
     4, 250, 5, 250, 4, 250, 5, 250, 4, 250, 2, 250, -1, 250,
     3, 1000, 6, 250, 5, 250, 6, 500, 5, 500, 6, 500, 8, 500, 9, 500, 8, 500, 8, 250, 8, 500, 6, 250, 9, 250, 8, 500, 7, 250, 8, 250, 7, 250, 8, 250, 7, 250, 6, 500, -1, 500,
     5, 250, 6, 250, 7, 500,
     6, 500, 5, 500, 2, 250, 6, 500, 5, 250, 4, 500, 4, 250, 4, 250, 5, 250, 3, 250, 3, 500, 3, 250, 3, 250, 3, 500, 2, 500, 3, 750, 1, 500, 3, 500, 2, 1000, 4, 500, 5, 500, 6, 1000, -1, 500,
     6, 250, 8, 250, 9, 250, 8, 250,
     6, 250, 8, 250, 8, 250, 6, 250, 5, 250, 8, 250, 6, 250, 8, 250, 6, 1000, -1, 500,
     7, 750, 6, 250, 5, 500,
     7, 500, 6, 500, 5, 500, 4, 1000, 3, 750, 2, 250, 3, 500, 4, 500, 3, 2},
	{0, 1, 666, 2, 334, 4, 334, 4, 334, 2, 334, 4, 334, 5, 334, 6, 666, 5, 999, -1,666, //因为爱情
	 4, 334, 2, 334, 6, 334, 5, 334, 2, 334, 6, 334, 5, 666, -1, 334, 4, 500, 2, 999, -1,666, 
	 2, 334, 3, 334, 4, 334, 4, 334, 2, 334, 6, 500, 5, 999,
	 6, 666, 5, 666, 5, 666, 
	 5, 666, 6, 666, 6, 2664, -1, 2664, 
	 1, 334, 2, 334, 4, 334, 4, 334,2, 334, 4, 334, 5, 334, 6, 666, 5, 999, -1, 666, 
	 4, 334, 2, 334, 6, 334, 5, 334, 2, 334, 6, 334, 5, 666, -1, 334, 4, 500, 2, 999, -1, 666, 
	 2, 334, 3, 334, 4, 334, 4, 334, 2, 334, 6, 500, 5, 999, 
	 4, 666, 2, 334, 4, 334, 6, 666, 8, 833, 5, 2132, -1, 1332, 
	 5, 666, 6, 334, 8, 833, 6, 999, -1, 334, 
	 8, 334, 8, 334, 6, 334, 5, 334, 8, 334, 8, 666, -1, 666, 
	 9, 334, 10, 334, 11, 334, 11, 334, 11, 334, 10, 334, 11, 666, 10, 666, 10, 666, 8, 250, 6, 1415,
	 8, 334, 6, 334, 8, 666, 9, 999, -1, 334, 
	 8, 334, 9, 334, 8, 334, 8, 334, 4, 1166, 
	 2, 334, 4, 334, 6, 334, 5, 334, 2, 334, 6, 334, 5, 334, 2, 334, 9, 334, 8, 1083, 
	 5, 666, 6, 334, 8, 500, 6, 999, -1, 334, 
	 8, 334, 8, 334, 6, 334, 5, 334, 8, 334, 8, 999,
	 9, 334, 10, 334, 11, 334, 11, 334, 11, 334, 10, 334, 11, 666, 10, 666, 10, 666, 8, 250, 6, 1415, 
	 8, 334, 6, 334, 8, 666, 9, 666, -1, 334, 8, 334, 9, 250, 8, 84, 8, 334, 4, 833,
	 2, 334, 4, 334, 6, 334, 5, 334, 2, 334, 6, 334, 5, 334, 2, 334, 6, 334, 5, 1500, 
	 6, 111, 5, 56, 6, 223, 4, 2831, -1},
	{0, 1,260, 1,260, 1,260, 2,260, 3,260, 2,260, 2,650, 1,650, -1,1300,//难念的经
	 5,260, 3,260, 3,260, 5,260, 6,260, 5,260, 5,650, 3,650, -1,975,
	 8,260, 6,260, 6,260, 8,260, 9,260, 8,260, 8,650, 6,650, -1,975,
	 6,260, 8,260, 6,260, 6,260, 5,260, 3,260, 3,650, 2,650, -1,975,
	 1,260, 1,260, 1,260, 2,260, 3,260, 2,260, 2,650, 1,650, -1,975,
	 5,260, 3,260, 3,260, 5,260, 6,260, 5,260, 5,650, 3,650, -1,975,
	 8,260, 6,260, 6,260, 8,260, 9,260, 8,260, 8,650, 6,650, -1,975,
	 6,260, 8,260, 8,260, 6,260, 5,260, 3,260, 3,650, 2,650, -1,975,
	 1,1950, 8,1950, 6,260, 8,260, 6,260, 6,260, 5,260, 3,260, 5,975, -1,975,
	 2,1950, 6,1950, 6,260, 8,260, 6,260, 6,260, 5,260, 3,260, 3,260, 2,650, -1,975,
	 1,1950, 8,1950, 6,260, 8,260, 6,260, 6,260, 5,260, 3,260, 5,975, -1,975,
	 2,1950, 10,1950, 10,260, 10,260, 10,260, 10,260, 9,260, 8,260, 
	 9,260, 5,260, 5,260, 5,260, 10,650, 10,260, 8,260, 8,260, 8,260, 6,260, 6,260,
	 6,260, 3,260, 3,260, 3,650, 9,260, 9,260, 7,260, 7,260, 7,260, 5,260, 5,260,
	 5,260, 3,260, 3,260, 3,650, 8,650, 8,260, 6,260, 6,260, 6,260, 4,260, 4,260,
	 4,260, 2,260, 2,260, 2,650, 2,650, 5,260, 5,260, 5,260, 9,260, 9,260, 9,260,
	 10,260, 11,260, 10,260, 9,260, 5,260, 5,260, 10,260, 8,260, 8,260, 8,260, 6,260, 6,260,
	 6,260, 3,260, 3,260, 3,650, 9,650, 9,260, 7,260, 7,260, 7,260, 5,260, 5,260,
	 5,260, 3,260, 3,260, 3,260, 8,650, 8,260, 6,260, 6,260, 6,260, 4,260, 4,260,
	 4,260, 2,260, 2,260, 2,650, 2,650, 5,975, -1},
	{0, 6,860, 3,860, 7,860, 11,860, //美丽的神话
	 6,300, 1,300, 2,300, 1,300, 3,860, 11,860,
 	 6,860, 6,860, 5,300, 6,300, 5,300, 2,300,
	 4,300, 3,300, 3,860, 11, 860, 11,860, 6,860, 6,860, 5,300, 6,300, 5,300, 2,300,
	 3,860, 11,860, 1,860, 11,860,
	 6,860, 3,860, 2,1290, 7,430, 6,860, 11,860, 11,860, 11,860, 
	 6,860, 3,860, 7,1290, 7,430, 6,300, 1,300, 2,300, 1,300, 3,860, 11,860,
	 6,860, 6,860, 5,300, 6,300, 5,300, 2,300, 4,300, 3,300, 3,860, 11,860, 11,860, 
	 6,860, 6,860, 5,300, 2,300, 3,300, 4,300, 3,860, 2,860, 1,860, 11,860,
	 6,860, 2,860, 1,1290, 7,430, 6,860, 11,860, 11,860, 6,300, 7,300,
	 1,300, 2,300, 3,300, 1,300, 7,860, 5,860,
	 6,300, 1,300, 2,300, 3,300, 3,860, 6,300, 7,300,
	 1,300, 2,300, 3,300, 1,300, 7,860, 5,860, 
	 6,300, 1,300, 2,300, 1,300, 1,860, 6,300, 7,300, 
	 1,300, 2,300, 3,300, 1,300, 7,860, 5,860,
	 6,300, 1,300, 2,300, 3,300, 3,300, 3,300, 6,300, 7,300,
	 1,300, 2,300, 3,300, 1,300, 7,860, 5,860, 
	 6,300, 1,72, 2,72, 2,72, 1,300, 1,860, 11,860, 
	 1,144, 1,72, 2,72, 3,300, 1,300, 7,860, 5,860, 
	 1,860, 7,860, 6,1290, 7,430, 6,860, 11,860, 11,860, 11,860, -1}};